Skip to content

Conversation

@rebloor
Copy link
Contributor

@rebloor rebloor commented Oct 20, 2025

Description

This PR addresses the dev-docs needed requirements of Bug 1886894 Clear sessionStorage in browsingData.remove() for parity with "Clear Cookies and Site Data". It includes:

  • a release note
  • update to the browsingData.removeLocalStorage, browsingData.remove, and browsingData.DataTypeSet documentation.

Related issues and pull requests

Related BCD changes in PR mdn/browser-compat-data#28261.

@rebloor rebloor requested review from Rob--W and dotproto October 20, 2025 17:43
@rebloor rebloor self-assigned this Oct 20, 2025
@rebloor rebloor requested review from a team as code owners October 20, 2025 17:43
@rebloor rebloor requested review from pepelsbey and removed request for a team October 20, 2025 17:43
@rebloor rebloor added the Content:WebExt WebExtensions docs label Oct 20, 2025
@github-actions github-actions bot added Content:Firefox Content in the Mozilla/Firefox subtree size/s [PR only] 6-50 LoC changed labels Oct 20, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 2025

Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented on specific lines; please double check if there are any inconsistencies in other places in the browsingData API docs that need to be updated.

I haven't checked whether all (un)supported options are correctly listed; I'll do that at the next review pass.

- : `boolean`. IndexedDB data.
- `localStorage` {{optional_inline}}
- : `boolean`. Local storage data.
- : `boolean`. Local and session storage data.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid confusion with the storage.local and storage.session extension APIs, could you reference localStorage and sessionStorage API docs (with this spelling)? E.g. local storage (localStorage) and session storage (sessionStorage), with the API names between braces pointing to the API docs.

The generic term is web storage (but most people know it by local storage, I guess?). API docs that encompasses both storage APIs: https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API

Values of this type are objects. They contain these properties:

- `cookieStoreId` {{optional_inline}}
- : `string`. This property only applies to cookies and indexedDB items. The removal is limited to items belonging to a specific [cookie store](/en-US/docs/Mozilla/Add-ons/WebExtensions/API/cookies/CookieStore) as specified by the ID. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enumeration should mention localStorage too.

@github-actions github-actions bot added size/m [PR only] 51-500 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Oct 21, 2025
Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good from the editorial perspective. Thanks! Just a nit in the release notes.

@rebloor rebloor requested review from a team as code owners November 6, 2025 17:47
@rebloor rebloor requested review from bsmth and removed request for a team November 6, 2025 17:47
Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good. I did not check the existing source to see if there is other stuff that might have been missed, but I assume that you did that.


This is an asynchronous function that returns a [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
- clear records of web pages visited after a given time.
- control whether to clear records of web pages or web pages and extensions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"web pages or web pages and extensions" reads a bit ambiguous. How about this:

Suggested change
- control whether to clear records of web pages or web pages and extensions.
- control whether to clear records of web pages, or web pages and extensions.

Comment on lines +13 to +14
- clear local and session storage objects created after a given time.
- control whether to clear localStorage and sessionStorage objects created by web pages or web pages extensions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"objects" -> "values". The localStorage/sessionStorage APIs only store strings, so it's a bit strange to refer to it as objects. This was already a pre-existing issue, but since we're editing this anyway...

Suggested change
- clear local and session storage objects created after a given time.
- control whether to clear localStorage and sessionStorage objects created by web pages or web pages extensions.
- clear local and session storage values created after a given time.
- control whether to clear localStorage and sessionStorage values created by web pages or web pages extensions.


- `removalOptions`
- : `object`. A {{WebExtAPIRef("browsingData.RemovalOptions")}} object, which may be used to clear only local storage objects created by normal web pages or to clear objects created by hosted apps and extensions as well.
- : `object`. A {{WebExtAPIRef("browsingData.RemovalOptions")}} object, which can be used to clear local and session storage objects stored after a given time, and control whether to clear local and session storage objects created by web pages or web pages and extensions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested edit for consistency with earlier methods.

But note: Firefox does NOT support "since" with removeLocalStorage (or the localStorage) option. This should be documented in BCD/MDN. Chrome does support it.

Suggested change
- : `object`. A {{WebExtAPIRef("browsingData.RemovalOptions")}} object, which can be used to clear local and session storage objects stored after a given time, and control whether to clear local and session storage objects created by web pages or web pages and extensions.
- : `object`. A {{WebExtAPIRef("browsingData.RemovalOptions")}} object, which can be used to clear localStorage and sessionStorage values stored after a given time, and control whether to clear localStorage and sessionStorage objects created by web pages, or web pages and extensions.

@bsmth bsmth removed their request for review November 7, 2025 10:45
@bsmth
Copy link
Member

bsmth commented Nov 7, 2025

Editorial approval from Vadim in #41609 (review) so removing my review 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Firefox Content in the Mozilla/Firefox subtree Content:WebExt WebExtensions docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants